home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
101-125
/
103
/
sol
/
readme
< prev
next >
Wrap
Text File
|
1995-03-13
|
4KB
|
80 lines
This version is for the Amiga only. I stripped out all the stuff for
the various Unix versions and put Amiga console control codes in place of
the curses calls. I also fixed a bug in the solx auto mode. Both programs
need an 80 column CLI window. To execute, just type the program name at
the CLI prompt. I also wrote a shell script (sol.sh) to run solx in auto
mode repeatedly and count the number of games until a win. I compiled
under Manx as follows:
cc sol.c -E200
ln sol.o -lc
An alias for Matt's shell in the file ccm.so can be used to compile
these programs. first 'source ccm.so', then use the command
'ccm sol' or 'ccm solx' to compile.
Joel Swank 9/22/87
Following are the readme files from the 2 previous authors:
---------------------------------------------------------------------------
I've done some work on "sol.c" to make it portable to more systems than
just BSD. The only thing that needs to be specified is whether System V
terminfo/curses's termcap emulation is being used; compile with -DTERMINFO if
so. (The Makefile has been modified for this.) The other conditionals are
based on SIGTSTP (independent of others; some System V's have job control) and
on TCGETA from sys/ioctl.h. With no special compile #define's aside from the
terminfo stuff, sol.c will make itself at home on your system.
I ripped the gettimeofday() calls out of both programs and used localtime()
instead. It does the job, since the returned value is used only to seed
the random number generator, and it's portable.
I installed a bugfix in the termcap stuff while I was at it; the original
author apparently didn't understand how the "bs" and "bc" attributes work.
I've fixed that so it should work as per termcap(4).
Through the magic of "sdiff" and the fact that "sol" and "solx" are basically
derived from the same original source code, I have made the same changes to
"solx". Again, they work here.
I haven't tested this under BSD (I don't have a BSD system available to me)
so I may have broken something under BSD. The game does successfully auto-
configure for System III and System V, and works fine. (It also uses termio
on these systems, so "echoe" gets reset properly.) Presumably it will work
properly under Xenix 3 and Xenix 5, but I can't test it.
Have fun with "sol" and "solx".
++Brandon
(author's original README included below)
===============================================================================
Sources for two solitaire games - a while back someone posted some sources
in some language or other that played solitaire. With about two evenings
woth of work that became sol.c - standard solitaire. To compile either game
(under BSD4.3) use a command like 'cc -o sol sol.c -ltermcap' or
'cc -o solx solx.c -ltermcap' - you'll have to adjust on Xenix for termcap
etc. etc. etc. solx.c is a different solitaire game, and a lot more
difficult to get out. You start with 1 run containing a single card
(#1 in the game), then hidden piles 2 thru 7, containing 2 thru 7 cards
respectively. The remaining 24 cards are dealt on runs 2 thru 7 - four
in each run. There is no deck - all you can do is to move runs around.
Unlike regular solitaire, runs can be split, hence the altered move
command, and since runs can get a bit long (I've seen them as big as
22-23 cards) I've turned the display on it's side. Both games have several
cheats, and an autopilot, although the autopilot for solx is not very clever.
In order to prevent thrashing of runs I coded it so that it will only move
a run if the top card being moved was not already placed. However there
are times when such an apparently redundant move is necessary to get out.
Best of luck, and have fun.
--
dg@wrs.UUCP - David Goodenough
+---+
| +-+-+
+-+-+ |
+---+